package Day1;

import java.util.*;
// 1:无需package
// 2: 类名必须Main, 不可修改
/**
 * 2020JavaB真题: 成绩统计
 * https://www.lanqiao.cn/problems/502/learning/?problem_list_id=2&page=1&tags=2020&tag_relation=union
 */
public class Main2 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        //在此输入您的代码...
        int n = scan.nextInt();
        double a = 0 , b = 0;
        for(int i = 0; i < n; i++){
          int x = scan.nextInt();
          if(x >= 60){
            a++;
          }
          if(x >= 85){
            b++;
          }
        }
        System.out.println((int)((a*100)/n + 0.5) +"%");
        System.out.println((int)((b*100)/n + 0.5) +"%");
        scan.close();
    }
}